
public  class Auction {
	int pot=0;
	int maxbet=0;
	
	
	
	public  void Round(String bets){
		
		int bet= Integer.parseInt(bets);
		
			pot = pot+bet;
			if(bet>maxbet)
				maxbet=bet;
	}
	
	public String givecash(String data){//  CZY ALLIN, WYSOKOSC ALLIN, LICZBE AKTYWNYCH GRACZY
		String[] actions= null;
		int cash=0;
		String money;
		actions=data.split(" ");
		if(actions[0].equals("1")){
			int allin= Integer.parseInt(actions[1]);
			int playersnm= Integer.parseInt(actions[2]);
			cash=allin*playersnm;
			pot=pot-cash;
			money=""+cash;
			maxbet=0;
			return(money);
		}
		
		else{
			cash=pot;
			pot=0;
			money=""+cash;
			maxbet=0;
			return(money);	
		}
		
	}
	

	
}


